<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>选择出行城市</title>
    <link rel="stylesheet" href="../../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../../css/iconfont/iconfont.css">
    <link rel="stylesheet" href="../../../css/index/hotel/sort.css"/>
    <link rel="stylesheet" href="../../../css/index/hotel/addr.css">
    <link rel="stylesheet" href="../../../css/my/frequenter/index.css"/>
</head>
<body style="cursor: pointer">
<header class="aui-bar aui-bar-nav" id='header'>
    <a class="aui-pull-left aui-btn" onclick="closeWin();">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">选择城市</div>
    <a class="aui-pull-right" id="train_achieve">
        确认
    </a>
</header>
</body>
<script src="../../../script/aui/api.js"></script>
<script src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<!-- <script type="text/javascript" src="../../../../script/extend/jquery.charfirst.pinyin.js"></script>
<script language="javascript" src="../../../../script/aui/aui-tab.js"></script>
<script type="text/javascript" src="../../../../script/extend/sort.js"></script>
<script type="text/javascript" src="../../../../script/extend/doT.min.js"></script>
<script type="text/javascript" src="../../../../script/config.js"></script>
 -->
<script>
    apiready = function () {

        api.parseTapmode();
        //设置高度
        var header = $api.byId('header');
        $api.fixStatusBar(header);
        city_on = api.pageParam.city_on;//获取城市标识
        console.log(city_on);
        var contentHead = api.winHeight - $api.byId('header').offsetHeight;
        api.openFrame({
            name: 'addr_frm',
            url: './addr_frm.html',
            rect: {
                x: 0,
                y: $api.byId('header').offsetHeight,
                w: 'auto',
                h: contentHead
            },
            pageParam: {
                city_on: city_on
            },
            bounces: true,
            bgColor: 'rgba(0,0,0,0)',
            vScrollBarEnabled: true,
            hScrollBarEnabled: true
        });
    };
    //城市标识
    $('#train_achieve').click(function () {
        if (city_on == 0) {
            cName = $api.getStorage('train_start_site');
        } else {
            cName = $api.getStorage('train_end_site');
        }
        api.sendEvent({
            name: 'cityName',
            extra: {
                city_on: city_on,
                cname: cName
            }
        });
        api.closeWin({});

    })


    function change(obj) {
        get_travelers_list(obj.value);
    }

</script>
</html>
